<h:panelGroup xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:t="http://myfaces.apache.org/tomahawk" width="100%" columns="1">
	<p:dataTable var="data" value="#{evokPatientQtnaireBean.questions}"
		rowIndexVar="ri" id="qtTable">
		<p:summaryRow type="header">
			<p:column colspan="3" rendered="#{data.qt.sort == 1}">
				<h:outputText value="#{data.qt.qtCategory.name}"
					rendered="#{data.qt.qtCategory.name != 'DEFAULT'}" />
				<h:outputText value="#{msgs.patient_qtnaire_qt_list}"
					rendered="#{data.qt.qtCategory.name == 'DEFAULT'}" />
				<h:graphicImage value="#{data.qt.imgUrl}" rendered="#{data.qt.imgUrl != null}" />
			</p:column>
		</p:summaryRow>
		<p:column>
			<f:facet name="header">
				<h:outputText value="#{msgs.table_index}" />
			</f:facet>
			<h:outputText value="#{data.qt.sort}" />
		</p:column>
		<p:column>
			<f:facet name="header">
				<h:outputText value="#{msgs.default_text}" />
			</f:facet>
			<h:outputText value="#{data.qt.name}" />
		</p:column>
		<p:column>
			<h:selectOneMenu value="#{data.resultId}"
				label="#{msgs.patient_qtnaire_qt_group_text} #{data.qt.qtCategory.sort} #{msgs.patient_qtnaire_qt_text} #{data.qt.sort}"
				converter="longConverter" required="true"
				rendered="#{evokPatientQtnaireBean.resultSelectMap[data.qt.qtCategory.id] != null}">
				<f:selectItem itemLabel="" itemValue="" />
				<f:selectItems
					value="#{evokPatientQtnaireBean.resultSelectMap[data.qt.qtCategory.id]}"
					var="rd" itemLabel="#{rd.name}" itemValue="#{rd.id}" />
			</h:selectOneMenu>

			<p:inputTextarea
				rendered="#{evokPatientQtnaireBean.resultSelectMap[data.qt.qtCategory.id] == null}"
				value="#{data.content}" maxlength="1000" rows="5"
				style="validator:checkNotNull(#{msgs.patient_qtnaire_qt_group_text} #{data.qt.qtCategory.sort} #{msgs.patient_qtnaire_qt_text} #{data.qt.sort}); width: 90%;" />
		</p:column>
	</p:dataTable>
</h:panelGroup>

